﻿CREATE TABLE [dbo].[Flight] (
    [Id]               INT           IDENTITY (1, 1) NOT NULL,
    [DepartureDate]    DATETIME      NOT NULL,
    [ArrivalDate]      DATETIME      NOT NULL,
    [AirportCodeFrom]  VARCHAR (10)  NOT NULL,
    [AirportCodeTo]    VARCHAR (10)  NOT NULL,
    [DestinationCount] INT           NOT NULL,
    [Price]            FLOAT (53)    NOT NULL,
    [Currency]         NVARCHAR (20) NOT NULL,
    CONSTRAINT [PK__Chuyen_B__887426CF1E4AF186] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Flight_Airport] FOREIGN KEY ([AirportCodeFrom]) REFERENCES [dbo].[Airport] ([AirportCode]),
    CONSTRAINT [FK_Flight_Airport1] FOREIGN KEY ([AirportCodeTo]) REFERENCES [dbo].[Airport] ([AirportCode])
);

